package com.vegetable.modules.service.outbound.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vegetable.modules.entity.outbound.AllocationOrderDetail;
import com.vegetable.modules.mapper.outbound.AllocationOrderDetailMapper;
import com.vegetable.modules.service.outbound.IAllocationOrderDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 销售订货 服务类
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-27
 */
@Slf4j
@Service
public class AllocationOrderDetailServiceImpl extends ServiceImpl<AllocationOrderDetailMapper, AllocationOrderDetail> implements IAllocationOrderDetailService {


    @Override
    public List<AllocationOrderDetail> selectByOrderId(Long orderId) {
        QueryWrapper<AllocationOrderDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_id", orderId);
        return this.baseMapper.selectList(queryWrapper);
    }

    @Override
    public void insert(AllocationOrderDetail inDetail) {
        this.baseMapper.insert(inDetail);
    }

}
